/* 基础样式 */
:root {
    --primary-color: #0366d6;
    --secondary-color: #24292e;
    --accent-color: #2ea44f;
    --text-color: #24292e;
    --light-text: #586069;
    --border-color: #e1e4e8;
    --bg-color: #ffffff;
    --card-bg: #f6f8fa;
    --hover-bg: #f1f1f1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, #0366d6, #2ea44f);
    color: white;
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.badges {
    margin-bottom: 30px;
}

.badges img {
    margin: 0 5px;
}

.cta-buttons {
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.primary {
    background-color: var(--accent-color);
    color: white;
}

.primary:hover {
    background-color: #2c974b;
}

.secondary {
    background-color: white;
    color: var(--primary-color);
}

.secondary:hover {
    background-color: #f1f1f1;
}

/* 主要内容样式 */
main {
    padding: 40px 0;
}

section {
    margin-bottom: 60px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
}

h4 {
    font-size: 1.2rem;
    margin: 20px 0 10px;
    color: var(--primary-color);
}

pre {
    background-color: var(--card-bg);
    border-radius: 6px;
    padding: 16px;
    overflow: auto;
    margin: 16px 0;
}

code {
    font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
}

/* 特性卡片 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

/* 函数列表样式 */
.package {
    background-color: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 30px;
}

.function-groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.function-list {
    list-style: none;
}

.function-list li {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 8px;
    background-color: var(--card-bg);
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.function-list li:hover {
    background-color: var(--hover-bg);
}

.function-name {
    font-weight: 600;
    color: var(--primary-color);
}

.function-desc {
    color: var(--light-text);
    font-size: 0.9rem;
}

/* 函数详情样式 */
#function-detail {
    background-color: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 30px;
}

.hidden {
    display: none;
}

/* 页脚样式 */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 30px 0;
    text-align: center;
}

footer a {
    color: #58a6ff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        padding: 40px 0;
    }
    
    header h1 {
        font-size: 2.2rem;
    }
    
    .function-groups {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
}